﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="BaoAn.aspx.cs" Inherits="QuanLyHocSinh_BaoAn" %>

<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
 <script type="text/javascript">
     function ChonNgay() {
         // GetDataRepeatEdit(Convert.ToDateTime(txtNgayDD.Text));
         alert("OK");
       //  (document.getElementById("btnHide")).click();
         __doPostBack('btnHide', 'OnClick');
     }
     function Refresh() {
         $.ajax({
             type: "POST",
             url: "NienKhoaList.aspx?Refresh=OK",
             datatype: "json",
             contentType: "application/json; charset=utf-8",
             success: function (data) {
             },
             error: function (request, status, err) {
                 alert("Cập nhật thất bại");
                 alert(err);
             }
         });

     }
 </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" Runat="Server">
 <%--  --%>
<h2>Quản lý báo ăn</h2>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="toolbarContent" Runat="Server">
                                <li><a class="btn-add iframe" data-dimension="90%|90%" href="BaoAnDetails.aspx?ac='them'">Thêm</a></li>
                                <li><a class="btn-edit iframe" data-dimension="90%|90%" href="BaoAnDetails.aspx?ac='sua'">Sửa</a></li>
                                <li><a id="delete" class="btn-delete iframe" data-dimension="800|200" href="~/../../Delete.aspx?ac='BaoAn'" >Xóa</a></li>
                              <li><a id="Refresh" class="btn-refresh" data-dimension="800|200" href="#" onclick="Refresh()">Nạp dữ liệu</a></li>
<ajaxToolkit:ToolkitScriptManager ID="toolkit1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<%-- <asp:ScriptManager ID="ScriptManager1" runat="server" />-- ko dùng đc --%>
 <li style="color: #FFFFFF">
     <asp:Button runat="server" ID="btnHide" OnClick="btnHide_Click" Visible="False"/> 
     Ngày báo ăn 	<asp:TextBox width="100px" type="text" name="box-nhap-ma-quyen" 
         placeholder="--/--/----" id="txtNgayDD" runat="server" ontextchanged="txtNgayDD_TextChanged"   />
                   <ajaxToolkit:CalendarExtender ID="cal1" runat="server"   Format="dd/MM/yyyy" TargetControlID="txtNgayDD"  OnClientDateSelectionChanged="ChonNgay"/>
</li>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHeader" Runat="Server">


      <table>
                <tr>
                     <th class="col50">STT</th>
                    <th class="col200">Ngày báo ăn</th>
                    <th>Lớp</th>
                 
                </tr>
                 </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="bottomContent" Runat="Server">
<%--   
<asp:ScriptManager ID="ScriptManager1" runat="server" />--%>
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
               

                <ContentTemplate>
                
  <asp:Repeater ID="rptA" runat="server">
        <HeaderTemplate>
            <table>
        </HeaderTemplate>
        <ItemTemplate>
          
             <tr id="<%#Eval("Id")%>">
                <td class="col50"><%= id++%></td>
                     <td class="col200"><%#ConVertDate(DateTime.Parse(Eval("NgayBaoAn").ToString()))%></td>
                    <td><%#GetTenLopById(Eval("ClassID").ToString())%></td>
                 <%--   <td><%#Eval("Year")%></td>--%>
                  <%--  <td><%#Eval("")%></td>   StudentID--%>
               <%-- </tr>--%>
                 
        </ItemTemplate>
       <FooterTemplate>
            </table>
       </FooterTemplate>
    </asp:Repeater>
    
      </ContentTemplate>
            

                <Triggers>
                 <%--   <asp:AsyncPostBackTrigger ControlID="Button1" />--%>
                </Triggers>
            

            </asp:UpdatePanel>

</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="pageContent" Runat="Server">
<cc1:CollectionPager ID="Cpage" runat="server"
            BackNextDisplay="HyperLinks" BackNextLinkSeparator="" 
            FirstText="" HideOnSinglePage="False" LastText="" 
            MaxPages="200" PageNumbersDisplay="Numbers" PageNumbersSeparator="&amp;nbsp;" 
            PageSize="1" PagingMode="QueryString" QueryStringKey="Page" 
            ShowFirstLast="False"  ShowLabel="False" ShowPageNumbers="True" BackText="Trang trước" 
            NextText="Trang tiếp" ResultsLocation="None" ResultsStyle="" LabelStyle="">
            </cc1:CollectionPager>
</asp:Content>




